package com.xiaoshuidi.cloud.module.report.controller.datamanage.enums;

public enum OverdueScopeEnum {

    SCOP_1("逾期1-3天","逾期1-3天"),

    SCOP_2("","逾期4-10天"),
    SCOP_3("逾期11-20天","逾期11-20天"),
    SCOP_4("4","逾期21-30天"),
    SCOP_5("逾期31天以上","逾期31天以上"),


    ;

    private String type;

    private String value;

    OverdueScopeEnum(String type, String value) {
        this.type = type;
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByType(String type){
        for (OverdueScopeEnum typeEnum : OverdueScopeEnum.values()) {
            if(typeEnum.type.equals(type)){
                return typeEnum.value;
            }
        }
        //拿不到返回type
        return type;
    }


    public static String getTypeByValue(String value){
        for (OverdueScopeEnum typeEnum : OverdueScopeEnum.values()) {
            if(typeEnum.value.equals(value)){
                return typeEnum.type;
            }
        }
        //拿不到返回value
        return value;
    }
}
